The invention relates to processing pulse code modulation (PCM) data via a sigma-delta analog/digital (A/D) converter, particularly to recovering PCM data attenuated by the sigma-delta A/D converter.
In a signal processing system, a sigma-delta A/D converter is typically implemented for generating PCM data from input signals. Specifically, before undergoing processing by the sigma-delta A/D converter, the strength (amplitude) of input signals need to be reduced. Otherwise, the sigma-delta A/D converter could be saturated such that the PCM data generated by the saturated sigma-delta A/D converter are distorted. However, if the amplitude of input signals is reduced before undergoing processing by the sigma-delta A/D converter, the PCM data generated by the sigma-delta A/D converter do not reach the maximum code achievable within the width of the data path within the signal processing system.
Prior art approaches scale the PCM data back to the maximum code achievable within the width of the data path. Unfortunately, the scaling performed by prior art approaches do not always produce the desired result. In particular, the scaling factor for the PCM data generated by a sigma-delta converter actually depends on the sampling rate or recording frequency of input signals. But the prior art approaches do not account for this dependency between the proper scaling factor and the given sampling or recording frequency.
Thus, a need exists to compensate for the amplitude reduction of input signals to a sigma-delta A/D converter implemented within a signal processing system. Specifically, a need exists for scaling the amplitude of the PCM data back to the full-scale value achievable within the width of a data path within the signal processing system containing the sigma-delta A/D converter. Furthermore, a need exists for scaling the amplitude of the PCM data in accordance with the sampling rate or recording frequency of input signals en route to a sigma-delta A/D converter within a signal processing system.
The invention provides compensation for the amplitude reduction of input signals of a sigma-delta A/D converter within a signal processing system. Specifically, the invention provides scaling of the amplitude of the pulse code modulation (PCM) data back to the full-scale value achievable within the width of a data path within the signal processing system. Furthermore, the invention achieves the full-scale value of the PCM data in accordance with the sampling rate or recording frequency of input signals en route to a sigma-delta A/D converter within a signal processing system.
Advantageously, the invention is able to generate a scaling factor based on a sampling or recording frequency of input signals en route to a sigma-delta converter. Moreover, the invention is able to change the scaling factor to a new scaling factor in response to a new sampling or recording frequency. In one embodiment of the invention, scaling factors or contents of a scaling factor lookup table can be dynamically changed. In particular, the methods for generating and changing scaling factors can be implemented in software for a general purpose CPU. Additionally, the invention only adds minimal latency to the data stream.
Preferably, the invention is drawn to a method and a system for processing PCM data generated by a sigma-delta analog/digital (A/D) converter. A scaling factor is determined in accordance with a sampling frequency of an input signal to be processed by the sigma-delta A/D converter. The scaling factor is used to scale the PCM data to the maximum dynamic range allowed by the width of a data path associated with the transmission bus coupled to the sigma-delta A/D converter.
In response to an interrupt from an audio digital controller coupled to the sigma-delta A/D converter, a software device driver copies a block of PCM data within a direct memory access (DMA) buffer coupled to the sigma-delta A/D converter. Optionally, this copying operation can also be triggered by an interrupt from the User Application. The copied block of PCM data is scaled via the device driver by multiplying the copied PCM data by the scaling factor. The device driver then rails the scaled PCM data such that the dynamic range of said PCM data remains within the width of the data path of the transmission bus. In turn, the scaled and railed PCM data is sent to a user/application buffer for data consumption.
These and other objects and advantages of the present invention will no doubt become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiments which are illustrated in the various drawing figures.